{extend name="public/basic"}

{block name="main"}
<div class = "layui-row">
{auth:button rules="$buttons" rule="home/dictionary/add"}<button type = "button" action="dialog"  action-title="新增字典" class = "layui-btn layui-btn-success" action-url="{:url('add')}">新增</button>{/auth:button}
</div>
<table id="staff" class="layui-table">
    <thead>
    <tr>
        <th>ID</th>
        <th>字典名称</th>
        <th>字典值</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
        {volist name="record" id="vo"}
            <tr>
                <td>{$vo.id}</td>
                <td>{$vo.dict_name}</td>
                <td>{$vo.dict_value}</td>
                <td>
                    {auth:button rule="home/dictionary/edit" rules="$buttons"}<a href="javascript:;" action="dialog" action-title="编辑字典" action-url = "{:url('edit',['dv'=>$vo['dict_value']])}" title="编辑"><i class = "layui-icon layui-icon-edit"></i></a>{/auth:button}
                    {auth:button rule="home/dictionary/del" rules="$buttons"}<a href="javascript:;" action="del" action-url = "{:url('del',['id'=>$vo['id']])}"><i class="layui-icon layui-icon-delete"></i></a>{/auth:button}
                </td>
            </tr>

        {/volist}
    </tbody>
    <!-- tbody是必须的 -->
</table>
{$record->render()}

{/block}

